import request from '@/apis/request';
import { api } from '@/config/apiBaseUrl';

const URL = {
    getInfo: `${api}/userInfo/get/`,
    updateInfo: `${api}/userInfo/update`,
    getResume: `${api}/resume/getAllByUserId/`,
    addResume: `${api}/resume/add`,
    delResume: `${api}/resume/remove`,
    getOneResume: `${api}/resume/getById/`
};
// 获取个人信息
export function getInfo (id) {
    return request({ url: URL.getInfo + `${id}`});
}
// 更新个人信息
export function updateInfo (data) {
    return request({ url: URL.updateInfo, method: 'post', data });
}
// 获取个人所有简历
export function getInfoResume (id) {
    return request({ url: URL.getResume + `${id}`});
}
// 新增个人简历/resume/remove
export function addInfoResume (data) {
    return request({ url: URL.addResume, method: 'post', data});
}
// 删除个人简历
export function delInfoResume (data) {
    return request({ url: URL.delResume, method: 'post', data});
}
// 获取当前简历
export function getOneResumes (id) {
    return request({ url: URL.getOneResume + `${id}`});
}
